package com.vogue.supplymall.order.domain.dao;

import com.vogue.supplymall.common.domain.dto.EditCartInfo;
import com.vogue.supplymall.common.domain.dto.OrderDetailInfo;
import com.vogue.supplymall.common.domain.dto.OrderInfo;
import com.vogue.supplymall.common.domain.dto.RelevanceInfo;
import com.vogue.supplymall.order.domain.model.OrderItemProduct;

import java.util.List;
import java.util.Map;

/**
 * The interface Order item product dao.
 *
 * @aouthor: zhangliang
 * @date: Create in 2018-01-10
 */
public interface OrderItemProductDao extends BaseDao<OrderItemProduct, Long> {

    /**
     * Find cart list.
     *
     * @param editCartInfo the edit cart info
     * @return the list
     */
    List<Map<String, Object>> findCart(EditCartInfo editCartInfo);

    /**
     * Find cart count long.
     *
     * @param editCartInfo the edit cart info
     * @return the long
     */
    Long findCartCount(EditCartInfo editCartInfo);

    /**
     * Find cart list.
     *
     * @param orderInfo the order info
     * @return the list
     */
    List<Map<String, Object>> findOrder(OrderInfo orderInfo);

    /**
     * Find order product list.
     *
     * @param orderDetailInfo the order detail info
     * @return the list
     */
    List<Map<String, Object>> findOrderProduct(OrderDetailInfo orderDetailInfo);

    /**
     * Gets order item product by sql.
     *
     * @param orderid    the orderid
     * @param productid  the productid
     * @param attrplanid the attrplanid
     * @param storageid  the storageid
     * @return the order item product by sql
     */
    OrderItemProduct getOrderItemProductBySql(Long orderid,Long productid,Long attrplanid,Long storageid);

    /**
     * 根据商品、仓库、计划id 查询购物车中是否已经有不同规格的商品
     * @param editCartInfo
     * @return
     */
    Long getItemAndStorage(EditCartInfo editCartInfo);
}
